package cz.muni.fi.pa165.business.dao;

import cz.muni.fi.pa165.business.entity.Forest;
import cz.muni.fi.pa165.business.entity.ForestVisit;
import cz.muni.fi.pa165.business.entity.Picker;
import java.util.List;

/**
 * Interface for CRUD operations with ForestVisit
 *
 * @author Marek Rebo
 */
public interface ForestVisitDAO {

    /**
     * Insert new ForestVisit into database
     *
     * @param forestVisit - new visit of forest to create
     */
    public void createVisit(ForestVisit forestVisit);

    /**
     * Returns ForestVisit object with given id
     *
     * @param id - id of ForestVisit to found
     * @return ForestVisit object with given id
     */
    public ForestVisit getVisit(Long id);

    /**
     * Remove a forestVisit from database
     *
     * @param forestVisit - ForestVisit object to be removed
     */
    public void removeVisit(ForestVisit forestVisit);

    /**
     * Updates properties of forestVisit existing in database
     *
     * @param forestVisit - ForestVisit object with modified attributes
     */
    public void updateVisit(ForestVisit forestVisit);

    /**
     * Returns list of all forestVisits in database
     *
     * @return list of all forestVisits in database
     */
    public List<ForestVisit> retrieveAllVisits();

    /**
     * Returns list of all forestVisits with same picker
     *
     * @param picker - specific piker for all list of forestVisits
     * @return list of all forestVisits with same picker from database
     */
    public List<ForestVisit> retrieveVisitsByPicker(Picker picker);

    /**
     * Returns list of all forestVisits with same forest
     *
     * @param forest - specific forest for all list of forestVisits
     * @return list of all forestVisits with same forest from database
     */
    public List<ForestVisit> retrieveVisitsByForest(Forest forest);
}
